<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>ajax 初始化</title>
</head>
<body>
<script type="text/javascript">
    var xmlobj;
    if(window.ActiveXObject){
        xmlobj = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        xmlobj = new XMLHttpRequest();
    }
    alert(xmlobj);
</script>
</body>
</html>